const Header = ({ content, addContent }) => {
  const keypress = (e) => {
    if (e.keyCode !== 13) return
    addContent(e.target.value)
    e.target.value = ''
  }
  // const { todoList } = this.props
  return (
    <header className="header">
      <h1>todos</h1>
      <input
        className="new-todo"
        placeholder="What needs to be done?"
        onKeyUp={keypress}
        autoFocus
      />
    </header>
  )
}
export default Header
